The present invention relates to an image processing apparatus and, more particularly, to an image processing apparatus for generating a high-quality image from a two-dimensional color image signal sensed by such as a single-CCD color electronic camera device.
Generally in an electronic image sensing apparatus for sensing an image using an image sensor such as a single multi-color filtered CCD, an image having all color data (RGB or a luminance value and color difference signals) for each pixel is generated by interpolation processing of a pixel value for an image made up of many pixels arrayed in a matrix on a two-dimensional plane, each of which has the pixel value of only one of a plurality of colors (primary colors).
To display an image sensed by the image sensor on a display device smaller in the number of pixels than the image, the original image must be downsized. In this case, if pixels forming the original image are simply thinned out, data of the original image is omitted, so-called aliasing noise is generated, and resultant images are jaggy. Hence, to downsize an image, the original image must be sampled at an interval larger than the pixel interval of the original image after the high-frequency component of the original image is attenuated by a low-pass filter.
For this image reduction processing, an analog or digital low-pass filter and a re-sampling circuit may be conventionally arranged for each pixel line. In most cases, filter calculation processing (convolution calculation) is done after an intermediate image having all color data for each pixel of an original image is generated using a DSP (Digital Signal Processor).
As calculation processing of this type, low-pass filter processing is done for each pixel of an intermediate image in units of a plurality of pixels contained in a predetermined region called a sub-matrix, and the sub-matrix is shifted on the original image while a portion overlapping a previous sub-matrix is left slightly.
However, the conventional method must generate an intermediate image having all color data for each pixel of an original image before filter calculation processing. Even when a still image which need not be recorded is displayed, e.g., an image is displayed on the viewfinder of a digital still camera in order to determine the perspective, a large-size intermediate image having a large number of pixels is generated only to obtain a small-size image having a relatively small number of pixels for the viewfinder.
This prolongs the processing time, and an image cannot be obtained in real time. Determination of the perspective required to update and display an image relatively rapidly cannot be realized in practical use.
Since a larger number of calculation processes than the number of processes of obtaining a high-quality recording image must be performed at high speed, power consumption increases along with the processes. A device such as a digital still camera which operates with a battery cannot attain a sufficient operation time.
The present invention has been made to overcome the conventional drawbacks, and has as its object to provide an image processing apparatus capable of obtaining a high-quality, small-size image at high speed without requiring a large number of processes or high power consumption.
To achieve the above object, according to the present invention, there is provided an image processing apparatus for generating, from an image signal, a new image signal having pixel values of all color data for each interpolation point set on a two-dimensional plane 1/n (n is an integer of not less than 2) times the image signal, comprising an interpolation unit for interpolating a pixel value of each color data at an interpolation point using pixel values of pixels of the same color falling within an interpolation region of mxc3x97m pixels (m is an integer of not less than 2) centered on the interpolation point, for an interpolation point selected at an interval of n pixels in at least a pixel line direction or a pixel column direction from an original image signal which has only a pixel value of single predetermined color data and is obtained by an image sensing element made up of many pixels that are arrayed in a matrix on a two-dimensional plane and respectively have different color filters, and for outputting the pixel value as an interpolated pixel value at the interpolation point for each color data, a compensation value calculation unit for generating a pixel compensation value for compensating for the pixel value of the interpolation point using pixel values of a plurality of pixels falling within a compensation region of Mxc3x97M pixels (M is an integer not less than m and n) centered on the interpolation point that is wider than and includes the interpolation region, and a compensation unit for compensating for the interpolated pixel value of each color data at the interpolation point that is output from the interpolation unit by using the pixel compensation value corresponding to the interpolation point that is obtained by the compensation value calculation unit, and outputting the compensated pixel value as a new pixel value of each color data at the interpolation point.